package com.huluobo.high3demo.adapter;

import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.huluobo.high3demo.R;
import com.huluobo.mvvm.baen.GiftBeanResult;
import com.huluobo.mvvm.utils.ImageLoader;

import java.util.List;

/**
 * Created by LC on 2023/9/25.
 */
public class GiftAdapter extends BaseQuickAdapter<GiftBeanResult.GiftBean, BaseViewHolder> {
    public GiftAdapter(@Nullable List<GiftBeanResult.GiftBean> data) {
        super(R.layout.item_gift_layout, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, GiftBeanResult.GiftBean giftBean) {
        ImageView giftIcon = baseViewHolder.getView(R.id.gift_iv_icon);
        ImageLoader.getInstance().loadRoundImage(getContext(), giftBean.getGiftpath(), 5, giftIcon);

        baseViewHolder.setText(R.id.gift_tv_price, giftBean.getPrice() + "抖币");
    }
}
